<template>
  <div id="Collection">
    <div class="bgc">
      <van-row>
        <van-col span="24">
          <van-nav-bar title="我的收藏" left-text="返回" left-arrow @click-left="onClickLeft" />
        </van-col>
        <van-col span="24">
          <Goods :history="item" v-for="(item, index) in CollectionList" :key="index" />
        </van-col>
        <van-col span="24"> </van-col>
      </van-row>
    </div>
  </div>
</template>
<script>
import Goods from '@/components/user/GoodsContent.vue'
export default {
  name,
  data() {
    return {
      CollectionList: {}
    }
  },
  components: {
    Goods
  },
  mounted() {
    this.onGetCollectionList()
  },
  methods: {
    onClickLeft() {
      this.$router.back()
    },

    onGetCollectionList() {
      let data = {
        type: 0,
        page: 1,
        limit: 20
      }
      this.$get('collect/list', data)
        .then(result => {
          this.CollectionList = result.data.data.list
        })
        .catch(err => {})
    }
  }
}
</script>
<style lang="less" scoped></style>
